<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>{$shop_name}管理系统</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="__STATIC_LIB__layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="__STATIC_LIB__layuiadmin/style/admin.css" media="all">
    <link rel="stylesheet" href="__STATIC_LIB__layuiadmin/style/login.css" media="all">
</head>
<body class="loginBG">
    <div id="wraper">
        <canvas id="canvas"></canvas>
        <div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login" style="display: none;">
            <div class="layadmin-user-login-main">
                <div class="layadmin-user-login-box layadmin-user-login-header">
                    <h2>迅播商城商户登录</h2>
                    <p>烛照科技 - 新零售电商系统服务商</p>
                </div>
                <div class="layadmin-user-login-box layadmin-user-login-body layui-form">
                    <form class="layui-form">

                        <div class="layui-form-item">
                            <label class="layadmin-user-login-icon layui-icon layui-icon-username" for="LAY-user-login-username"></label>
                            <input type="text" name="mobile" id="LAY-user-login-username" lay-verify="required" placeholder="账号" class="layui-input">
                        </div>
                        <div class="layui-form-item">
                            <label class="layadmin-user-login-icon layui-icon layui-icon-password" for="LAY-user-login-password"></label>
                            <input type="password" name="password" id="LAY-user-login-password" lay-verify="required" placeholder="密码" class="layui-input">
                        </div>

                        <div class="layui-form-item" style="display:none;" id="captcha_div">
                            <div class="layui-row">
                                <div class="layui-col-xs7">
                                    <label class="layadmin-user-login-icon layui-icon layui-icon-vercode" for="LAY-user-login-vercode"></label>
                                    <input type="text" name="captcha" id="captcha_ipt" placeholder="验证码" class="layui-input">
                                </div>
                                <div class="layui-col-xs5">
                                    <div style="margin-left: 10px;">
                                        <img src="{:captcha_src()}" id="captcha_img" onclick="setCaptcha()" title="点击更换验证码" alt="captcha" style="max-width:120px;cursor:pointer;" />
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            {:zbToken()}
                            <button class="layui-btn layui-btn-fluid" lay-submit lay-filter="password_login">登 录</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
	<script src="__STATIC__js/login.js"></script>
    <script src="__STATIC_JS__jquery.min.js"></script>
    <script src="__STATIC_LIB__layuiadmin/layui/layui.js"></script>
    <script src="__STATIC_JS__zbshop.js"></script>
    <script>
        layui.config({
            base: '__STATIC_LIB__layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'form'], function() {
            var $ = layui.$,
                setter = layui.setter,
                admin = layui.admin;

            var form = layui.form;
            form.render();

            //提交
            form.on('submit(password_login)', function(data) {
                JsPost("{:url('seller/common/login')}", data.field, function(data){
                    if (data.status) {
                        layer.msg('登陆成功，跳转中...');
                        setTimeout("window.location.href='" + data.data + "'; ", 1500);
                    } else {
                        if (data.data == '10013' || data.data == '10012') {
                            $('#captcha_div').show();
                        }
                        setCaptcha();
                        layer.msg(data.msg);
                    }
                });
                return false;
            });

            //更改验证码图片
            setCaptcha = function() {
                $('#captcha_ipt').val("");
                var timestamp = new Date().getTime();
                $('#captcha_img').attr('src', '{:captcha_src()}?' + timestamp);
            }
        });
    </script>
</body>
<style>
.layadmin-user-login{
	z-index: 99;
}
</style>
</html>